
<template>
  <div id="app" >
      <div class="context" ref="context">
        <div class="dataBox" ref="dataBox">
            <!--数据表格-->
            <el-table v-if="isInit" ref="singleTable"
                        :data="datas"
                        :height="tableHeight"
                        @sort-change="sortChange"
                        v-loading="loading" size="mini"
                        style="width: 100%;" stripe=stripe border=border>
                <el-table-column type="index"  width="50" fixed="left" :label="$t('actorTable.xh')" align="center">
                </el-table-column>
                <el-table-column prop="actorCode" min-width="110" :label="$t('assetsAudit.actorInfo.actorNo')" sortable="custom" sort-by="actorCode" fixed="left">
                </el-table-column>
                <el-table-column prop="actorName" min-width="130" :label="$t('assetsAudit.actorInfo.actorName')" sortable="custom" sort-by="actorName" fixed="left">
                </el-table-column>
                <el-table-column prop="profession" min-width="150" :label="$t('assetsAudit.actorInfo.profession')" sortable="custom" sort-by="profession">
                </el-table-column>
                <el-table-column prop="sex" min-width="110" :label="$t('assetsAudit.actorInfo.sex')" sortable="custom" sort-by="sex">
                </el-table-column>
                <!-- <el-table-column prop="nationality" min-width="110" :label="$t('assetsAudit.actorInfo.nationality')" sortable="custom" sort-by="nationality">
                </el-table-column> -->
                <el-table-column prop="isEnable" min-width="110" :label="$t('assetsAudit.actorInfo.status')" sortable="custom" sort-by="isEnable">
                </el-table-column>
            </el-table>
        </div>
      </div>

  </div>


</template>

<script>
import comBaseVue from '../../baseViewModel';

export default {
  mixins: [comBaseVue],
  name: 'ActorInfo',
  data () {
    return {
        //真正的实体类名称
        modelName:"com.ispr.iptv.entity.media.MediaActor",
        // 是否正在提交中
        loading: false,
        isInit:false,
        tableHeight:600,
        appDivStyle:{
            height:this.$store.getters.appHeight,
        },
        //tableHeight:0,
        // 查询条件
        // formQueryCondition: {
        //     code: {              
        //         key: 'actorCode', 
        //         op: '=', // 操作符
        //         // val: '' // 查询的值
        //         val: [] // 查询的值
        //     },
        // },
        queryformLabelWidth:"75px",
        editformLabelWidth: '120px',
        editFormPosition: "right",
        // 分页对象
        pager: {
            curPage: 1,
            sizes: [20, 30, 50, 100, 200, 400],
            curSize: 20,
            total: 0
        },
        // 排序对象
        sort: {
            key: "actorCode",
            dir: "Desc"
        },
        // 是否显示编辑面板
        isShowEditForm: false,
        // 当前编辑面板执行的命令
        curCommand: "SaveNew",
        canEditCode:false,
        // 编辑面板绑定的对象
        editForm: {
            keyId: 0,
            version: 0,
            name:"",
            pName:"",
            byName:"",
            sex:"",
            enName:"",
            profession:"",
            beforeName:"",
            headPortrait:"",
            backgroundPicture:"",
            synopsis:"",
            bornDate:"",
            constellation:"",
            hight:"",
            weight:"",
            bloodType:"",
            graduateInstitutions:"",
            nationality:"",
            homePlace:"",
            microblog:"",
            musicWorks:"",
            score:"",
            heat:""
        },
        // 编辑面板的验证规则
        editRules: {

        },
        
    }
  },
  methods:{
    initTable:function(){
        // this.tableHeight = this.$refs.context.offsetHeight;
        this.isInit = true;
    },
    // 查询按钮
    onQuery: function() {
        this.pager.curPage = 1;
        this.queryTable();
    },
    // 查询网格数据
    queryTable: function() {
        this.loading = true;
        // this.queryModel(this.modelName,"Query",this.formQueryCondition,this.pager,this.sort,this.setTableData)
        this.queryModel(this.modelName,"Query",this.datas,this.pager,this.sort,this.setTableData)
    },


  },
  props:['datas'],
  mounted: function mounted() {
    this.onQuery();
    window.setTimeout(this.initTable,100);

  }
}


</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
